package com.yl.ydk.ui.adapter

import com.yl.ydk.R
import com.yl.ydk.bean.WifiListBean
import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.BaseViewHolder


class WifiInfoAdapter(data: MutableList<WifiListBean>?) :
    BaseQuickAdapter<WifiListBean, BaseViewHolder>(
        R.layout.item_wifiinfo,
        data
    ) {

    override fun convert(helper: BaseViewHolder?, item: WifiListBean?) {
        helper?.setText(R.id.tvName, item?.SSID)
        helper?.itemView?.setOnClickListener {
            onItemClick?.onListItemClick(item)
        }
    }

    private var onItemClick: onListItemClick? = null

    interface onListItemClick {
        fun onListItemClick(item: WifiListBean?)
    }

    fun onListItemClick(onListItemClick: onListItemClick?) {
        this.onItemClick = onListItemClick
    }


}